using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;
using Managistics.Model; 

namespace Managistics.Model.Mappings {
    
    
    public class SuppliersMap : ClassMap<Suppliers> {
        
        public SuppliersMap() {
			Table("SUPPLIERS");
			LazyLoad();
			Id(x => x.Supplierid).GeneratedBy.Assigned().Column("SUPPLIERID");
			Map(x => x.Suppliername).Column("SUPPLIERNAME").Not.Nullable().Length(500);
			Map(x => x.TelSupplier).Column("TEL_SUPPLIER").Not.Nullable().Length(20);
			Map(x => x.FaxSupplier).Column("FAX_SUPPLIER").Length(20);
			Map(x => x.AddressSupplier).Column("ADDRESS_SUPPLIER").Not.Nullable().Length(150);
			Map(x => x.WebsiteSupplier).Column("WEBSITE_SUPPLIER").Length(50);
			Map(x => x.ContactNameSupplier).Column("CONTACT_NAME_SUPPLIER").Length(50);
			Map(x => x.TypeSuppliers).Column("TYPE_SUPPLIERS").Not.Nullable().Length(1);
			Map(x => x.OrtherInformation).Column("ORTHER_INFORMATION").Length(150);
			Map(x => x.TaxCodeS).Column("TAX_CODE_S").Length(20);
			Map(x => x.DeadlineS).Column("DEADLINE_S").Length(20);
			Map(x => x.DeliveryS).Column("DELIVERY_S").Length(20);
			Map(x => x.DiscountS).Column("DISCOUNT_S").Precision(53);
			Map(x => x.BankAccountS1).Column("BANK_ACCOUNT_S1").Length(20);
			Map(x => x.BankAccountS2).Column("BANK_ACCOUNT_S2").Length(20);
			Map(x => x.MobileSupplier).Column("MOBILE_SUPPLIER").Length(20);
			HasMany(x => x.OrderNhanhNhanh).KeyColumn("SUPPLIERID");
        }
    }
}
